<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js四种输出</title>
</head>

<body>
    <span id="slogan"></span>
</body>

</html>
<script>
    window.console.log('我爱你中国');
    window.document.write('我爱你中国');
    // window.alert('我爱你中国');
    window.document.getElementById('slogan').innerText = '亲爱的母亲';
</script>